<template>
  <div>
    <h2>学院信息</h2>
    <h3>名称:{{ schoolName }}</h3>
    <h3>地址:{{ schoolAddress }}</h3>
    <button @click="showSchool">提交</button>
  </div>
</template>

<script>
export default {
  name: "School",
  data() {
    return {
      schoolName: "重庆大学",
      schoolAddress: "重庆",
    };
  },
  methods: {
    showSchool() {
      alert(`欢迎来到${this.schoolName},坐落于${this.schoolAddress}`);
    },
  },
};
</script>

<style scoped>
</style>